<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>砍价小程序</title>
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="robots" content="all,follow">
  <!-- Bootstrap CSS-->
  <link rel="stylesheet" href="./content/css/bootstrap.min.css">
  <!-- Font Awesome CSS-->
  <link rel="stylesheet" href="./content/css/font-awesome.min.css">
  <!-- Fontastic Custom icon font-->
  <link rel="stylesheet" href="./content/css/fontastic.css">
  <!-- Google fonts - Poppins -->
  <!-- theme stylesheet-->
  <link rel="stylesheet" href="./content/css/style.default.css" id="theme-stylesheet">
  <!-- Custom stylesheet - for your changes-->
  <link rel="stylesheet" href="./content/css/custom.css">
  <!-- Favicon-->
  <link rel="shortcut icon" href="./content/img/favicon.ico">
  <!-- Tweaks for older IEs-->
  <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script><![endif]-->

  <style>

  </style>
</head>

<body>
  <div class="page" id="app">
    <!-- Main Navbar-->
    <header class="header">
      <nav class="navbar">
        <!-- Search Box-->
        <div class="search-box">
          <button class="dismiss"><i class="icon-close"></i></button>
          <form id="searchForm" action="#" role="search">
            <input type="search" placeholder="What are you looking for..." class="form-control">
          </form>
        </div>
        <div class="container-fluid">
          <div class="navbar-holder d-flex align-items-center justify-content-between">
            <!-- Navbar Header-->
            <div class="navbar-header">
              <!-- Navbar Brand --><a href="index.html" class="navbar-brand d-none d-sm-inline-block">
                <div class="brand-text d-none d-lg-inline-block"><span>砍价小程序 </span><strong></strong></div>
                <div class="brand-text d-none d-sm-inline-block d-lg-none"><strong></strong></div>
              </a>
              <!-- Toggle Button--><a id="toggle-btn" href="#"
                class="menu-btn active"><span></span><span></span><span></span></a>
            </div>
            <!-- Navbar Menu -->
            <ul class="nav-menu list-unstyled d-flex flex-md-row align-items-md-center">

              <li class="nav-item"><a target="myiframe" href="updatepass.html" class="nav-link logout"> <span
                class="d-none d-sm-inline">修改密码</span></a></li>
              <!-- Logout    -->
              <li class="nav-item"><a href="login.html" class="nav-link logout"> <span
                    class="d-none d-sm-inline">退出</span><i class="fa fa-sign-out"></i></a></li>
            </ul>
          </div>
        </div>
      </nav>
    </header>
    <div class="page-content d-flex align-items-stretch">
      <!-- Side Navbar -->
      <nav class="side-navbar">
        <!-- Sidebar Header-->
        <div class="sidebar-header d-flex align-items-center">
          <div class="avatar"><img src="./content/img/headimg.png" alt="..." class="img-fluid rounded-circle"></div>
          <div class="title">
            <h1 class="h4" id="truename">管理员</h1>

          </div>
        </div>

        <ul class="list-unstyled" id="nav">






        </ul>

      </nav>
      <div class="content-inner">


        <iframe src='home/index.html' name="myiframe" id="myiframe" style="    width: 100%;
          height: 100%;" frameborder="0" scrolling="yes" class="x-iframe"></iframe>


        <!-- Page Footer-->
        <footer class="main-footer">
          <div class="container-fluid">
            <div class="row">
              <div class="col-sm-6">
                <p>Copyright &copy; 株式会社コリプロ　2018</p>
              </div>
              <div class="col-sm-6 text-right">
                <p></p>

              </div>
            </div>
          </div>
        </footer>
      </div>
    </div>
  </div>
  <!-- JavaScript files-->
  <script src="./content/js/jquery-1.10.2.min.js"></script>
  <script src="./content/js/bootstrap.min.js"></script>
  <script src="./content/js/jquery.cookie.js"> </script>

  <script src="./content/js/front.js"></script>
  <script src="./content/js/config.js"></script>
  <script>

    getmenu();
    function getmenu() {



      var type = localStorage.getItem("type");
      console.log("json", json);

      $("#truename").html(json.truename)



      $.post(apiurl + "/admin/checkmenu", { jiaoseid: json.jiaoseid, token: json.token }, function (data) {
        var html = ''
        var data = data.data;
        for (var i = 0; i < data.length; i++) {
          var children = data[i].children;


          if (children != undefined && children.length > 0) {


            html += '<li ><a href="#a' + data[i].id + '" class="tt" data-toggle="collapse"><i class="icon-interface-windows"></i>' +
              data[i].textstr + '</a>';


            html += '<ul  id="a' + data[i].id + '" class="collapse">  ';

            for (var j = 0; j < children.length; j++) {

              html += '<li ><a target="myiframe" href="' + children[j].nvaurl + '" >' + children[j].textstr + '</a></li>';

            }

            html += '</ul></li>';

          } else {

            html += '<li ><a target="myiframe" href="' + data[i].nvaurl + '"><i class="icon-interface-windows"></i>' +
              data[i].textstr + '</a></li>';
          }



        }

        $("#nav").html(html);


        $(".tt").click(function () {
          var display = $(this).parent().find("ul").css("display");

          if (display == "none") {
            $(this).parent().find("ul").show();
          } else {
            $(this).parent().find("ul").hide();
          }


        });


      });

    }

  </script>

</body>

</html>